From: Colin Walters Date: Wed, 10 Mar 2010 00:15:43 +0000 (-0500) Subject: Ensure our drag actor is positioned over the cursor X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~10313 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=7d8c3f1ecdd761d9d20ee8db459481675aaf2eaf;p=gnome-shell.git Ensure our drag actor is positioned over the cursor Previously we were looking at the source size, which is not necessarily the same as the drag actor size. https://bugzilla.gnome.org/show_bug.cgi?id=607821 --- diff --git a/js/ui/dnd.js b/js/ui/dnd.js index 717ea18bd..4ce2a0bf7 100644 --- a/js/ui/dnd.js +++ b/js/ui/dnd.js @@ -154,10 +154,9 @@ _Draggable.prototype = { // the dragActor over it. Otherwise, center it // around the pointer let [sourceX, sourceY] = this._dragActorSource.get_transformed_position(); - let [sourceWidth, sourceHeight] = this._dragActorSource.get_transformed_size(); let x, y; - if (stageX > sourceX && stageX <= sourceX + sourceWidth && - stageY > sourceY && stageY <= sourceY + sourceHeight) { + if (stageX > sourceX && stageX <= sourceX + this._dragActor.width && + stageY > sourceY && stageY <= sourceY + this._dragActor.height) { x = sourceX; y = sourceY; } else {